package com.ty.day4;

import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/9 17:51
 */
public class Task1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入性别（奇数为男和偶数为女）：");
        int sex = sc.nextInt();
        System.out.println("请输入年龄：");
        int age = sc.nextInt();
        if (sex % 2 == 1 && age >= 22 || sex % 2 == 0 && age >= 20) {
            System.out.println("合格");
        } else {
            System.out.println("不满足要求");
        }
    }
}
